package com.xpffly.design.proxy.dynamic.service.impl;


import com.xpffly.design.proxy.dynamic.service.GamePlayer;

/**
 * @Author: xpengfei
 * @Date: 2021/3/30 22:00
 * @Description：动态代理的真实角色
 */
public class GamePlayerReal implements GamePlayer {

    private String name = "";

    public GamePlayerReal(String name) {
        this.name = name;
    }

    public void login(String user, String password) {
        System.out.println("登录名为" + user + "的用户" + this.name + "登录成功！");
    }

    public void killBoss() {
        System.out.println(this.name + "正在打怪...");
    }

    public void upgrade() {
        System.out.println(this.name+"升级啦...");
    }
}
